    //
//  LotViewController.m
//  NumLot
//
//  Created by luotao on 12-8-15.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import "LotViewController.h"
#import "Cons.h"
#define START_HEIGHT -20
@implementation LotViewController

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/


// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
	[super loadView];

	CGRect scr=CGRectMake(SCREEN_WIDTH, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
	self.view.frame=scr;
	self.view.backgroundColor=[UIColor clearColor];
    
	UIScrollView *scrollView = [[UIScrollView alloc]init];
	
	scrollView.frame=CGRectMake(0, 0, 320, 370);
	scrollView.contentSize=CGSizeMake(300, 500);	
	//scrollView.backgroundColor=[UIColor blueColor];
    //scrollView.window.backgroundColor=[UIColor clearColor];
	[self.view addSubview:scrollView];	
    
    
    //背景的视图
	//UIImageView *mainBgView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"info_bar_bg.png"]];
    UIButton *mainBgView = [UIButton buttonWithType:UIButtonTypeRoundedRect];
	mainBgView.frame=CGRectMake(10, 0, 300, 480);
    mainBgView.userInteractionEnabled=NO;
    //mainBgView.backgroundColor=[UIColor blueColor];
	//mainBgView.backgroundColor=HEXCOLOR(0xf0f0f0ff);
	
    
    //背景的标题
	UILabel *label = [[UILabel alloc] init];
	label.text=@"福利彩票";
	label.backgroundColor=[UIColor clearColor];
	label.frame=CGRectMake(5,10,70,20);
	[mainBgView addSubview:label];
	[label release];
        
	[scrollView addSubview:mainBgView];
    
    
    UIImageView *lineImageView = [[UIImageView alloc]init];
    lineImageView.image=[UIImage imageNamed:@"line2"];
    lineImageView.frame=CGRectMake(10, 40, 300, 1);
    [scrollView addSubview:lineImageView];
	[lineImageView release];
    
    
    UIImage *image = [UIImage imageNamed:@"icon_all"];
    CGImageRef imageRef1=CGImageCreateWithImageInRect([image CGImage], CGRectMake(0, 0, 45*OS_TYPE, 45*OS_TYPE));
    UIImage *eleImg=[UIImage imageWithCGImage:imageRef1];
    
    UIImageView *image1 = [[UIImageView alloc]initWithImage:eleImg];
    image1.frame = CGRectMake(20, 50, 45, 45);
    [scrollView addSubview:image1];
    [image1 release];
    [eleImg release];
    
    lineImageView = [[UIImageView alloc]init];
    lineImageView.image=[UIImage imageNamed:@"line2"];
    lineImageView.frame=CGRectMake(10, 105, 300, 1);
    [scrollView addSubview:lineImageView];
	[lineImageView release];
    
    //UILabel

    
}


/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}
*/

/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


@end
